package com.fujin.gulimall.cart.feign;

import com.fujin.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @title: productFeign
 * @Author uIn
 * @Date: 2022/3/16 21:31
 * @Version 1.0
 */
@FeignClient("gulimall-product")
public interface ProductFeign {

    /**
     * 根据skuId查询商品信息
     * @param skuId
     * @return
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);

    /**
     * 根据skuId获取销售属性
     * @param skuId
     * @return
     */
    @RequestMapping("/product/skusaleattrvalue/getSkuSaleAttrValues")
    List<String> getSkuSaleAttrValues(@RequestParam("skuId") Long skuId);

}
